﻿
using WPF.Core.Dtos;
using WPF.Core.Models;

namespace WPF.Core.Services
{
    /// <summary>
    /// 用户服务
    /// </summary>
    public class UserService : BaseService<UserModel,User>
    {
        /// <summary>
        /// 登录接口
        /// </summary>
        /// <param name="account">账号</param>
        /// <param name="password">密码</param>
        /// <returns></returns>
        public async Task<User> LoginAsync(string account,string password)
        {
          return   await Sqlite.Select<User>().Where(u => u.Account == account && u.Password == password).FirstAsync();
        }
    }
}
